package com.lin.common.utils;

import net.coobird.thumbnailator.Thumbnails;

import java.io.File;
import java.io.IOException;

public class ImageUtils {
    public static void compress150(Iterable<File> files, String... sourcePath) throws IOException {
        Thumbnails.of(sourcePath)
                .size(150, 150).toFiles(files);
    }

    public static void compress150Single(String sourcePath, String targetFilePath) throws IOException {
        Thumbnails.of(sourcePath)
                .size(150, 150).toFile(targetFilePath);
    }
}
